/*
 * Exploder
 * 
 * Tero Pyylampi (218437), Jussi Tuurinkoski (211594)
 *
 * Background layer for the game
 */

#ifndef LAYERBACKGROUND_H
#define LAYERBACKGROUND_H

#include "cocos2d.h"

class GameScene;
class EditorScene;

class LayerBackground : public cocos2d::CCLayer
{
public:
	// default constructor for the game scene
	LayerBackground( GameScene *scene );
	// default constructor for the editor mode
	LayerBackground( EditorScene *scene );
	// default destructor
	~LayerBackground();

	// initialize this scene
	void initializeBackground( const char *backgroundFile, const char *upperBackgroundFile );
	// get the current background files
	const char *getBackgroundFile();
	const char *getUpperBackgroundFile();

	// update -function
	virtual void update( cocos2d::ccTime dt );
	
	// get the game scene
	GameScene *getGameScene();
	// get editor scene
	EditorScene *getEditorScene();

private:
	// pointer to the game scene
	GameScene *mGameScene;
	// pointer to the editor scene
	EditorScene *mEditorScene;

	// background images 
	cocos2d::CCSprite *mBackgroundSprites[ 3 ];
	// filename of the background image
	const char *mBackgroundSpriteFile;
	// upper background images
	cocos2d::CCSprite *mUpperBackgroundSprites[ 3 ];
	// filename of the upper bg image
	const char *mUpperBackgroundSpriteFile;
	
	// smoke effects connected
	cocos2d::CCParticleSystem *mSmokeEffects[ 3 ];
};

#endif